<?
/*	TEMPLATE META
	Name: Sidebar
*/
?>
<div id="sidebar">
	<div id="sidebar_top"></div>
<?
	if(drizzo_is_page('home')) {
?>
	<h2>Asides</h2>

	<? echo drizzo_asides(); ?>	

	<h2>Recent Posts</h2>

	<? echo drizzo_recent_posts(5, 'ul', '<li class="recent_post">','</li>'); ?>	

<? 		if(drizzo_events_upcoming(5)) { ?>
	<h2>Upcoming Events</h2>

	<? echo drizzo_events_upcoming(5); ?>
	
<?
		}
?>

	<h2>Tag Cloud</h2>
	
	<? echo drizzo_tag_cloud(); ?>

	<h2>Links</h2>
	
	<? echo drizzo_links_list(); ?>
<?
	} elseif(drizzo_is_page('blog')) {
?>
	<h2>Related Posts</h2>
	
	<? echo drizzo_recent_posts(); ?>
<?
	} elseif(drizzo_is_page('page')) {
?>
	<h2>Related Pages</h2>
	
	<? echo drizzo_related_pages(); ?>
<?
	} elseif(drizzo_is_page('events')) {
		$prev_month = $drizzo_event_month - 1;
		if($prev_month == 0) {
			$prev_month = 12;
			$prev_year = $drizzo_event_year - 1;
		} else {
			$prev_year = $drizzo_event_year;
		}
		$next_month = $drizzo_event_month + 1;
		if($next_month == 13) {
			$next_month = 1;
			$next_year = $drizzo_event_year + 1;
		} else {
			$next_year = $drizzo_event_year;
		}
		echo drizzo_events_month('simple', $prev_month, $prev_year);
		echo drizzo_events_month('simple', $drizzo_event_month, $drizzo_event_year);
		echo drizzo_events_month('simple', $next_month, $next_year);
	}
?>
<br class="clear" />
<div id="sidebar_btm_left"></div>
<div id="sidebar_btm_right"></div>
</div>

<hr />
